home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
VRML 2.0 Sourcebook (2nd Edition)
/
VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso
/
book
/
win
/
ch08
/
08fig06.wrl
< prev
next >
Wrap
Text File
|
1996-09-23
|
1KB
|
57 lines
#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright 1997 By
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
Group {
children [
# Moving box
DEF Cube1 Transform {
children DEF ACube Shape {
appearance Appearance {
material Material { }
}
geometry Box { size 1.0 1.0 1.0 }
}
},
Transform {
translation -2.0 0.0 0.0
children DEF Cube2 Transform {
children USE ACube
}
},
Transform {
translation 2.0 0.0 0.0
children DEF Cube3 Transform {
children USE ACube
}
},
# Animation clock
DEF Clock TimeSensor {
cycleInterval 4.0
loop TRUE
},
# Animation path
DEF CubePath PositionInterpolator {
key [
0.00, 0.11, 0.17, 0.22,
0.33, 0.44, 0.50, 0.55,
0.66, 0.77, 0.83, 0.88,
0.99
]
keyValue [
0.0 0.0 0.0, 1.0 1.96 1.0,
1.5 2.21 1.5, 2.0 1.96 2.0,
3.0 0.0 3.0, 2.0 1.96 3.0,
1.5 2.21 3.0, 1.0 1.96 3.0,
0.0 0.0 3.0, 0.0 1.96 2.0,
0.0 2.21 1.5, 0.0 1.96 1.0,
0.0 0.0 0.0
]
}
]
}
ROUTE Clock.fraction_changed TO CubePath.set_fraction
ROUTE CubePath.value_changed TO Cube1.set_translation
ROUTE CubePath.value_changed TO Cube2.set_translation
ROUTE CubePath.value_changed TO Cube3.set_translation